pp108 : Using a Web Service in a Business Process Model

Using a Web Service in a Business Process Model

This topic describes the procedure to use a Web service in a business process model.

Before you begin this task:
You must have the Process Developer role in Process Platform Business Process Engine package to use a Web service in a business process model .

Whenever there is a need to achieve a piece of automated functionality or when you need to re-use that functionality over and again, you need to create a Web service so that it is available for use when required. You can also make the Web service accessible over Internet so that it is within your reach independent of geographical location or the network that you are connected to. With Process Platform Web service , you can create Web services and use them in a business process model.

  1. Select a starting point and select (Business Process Model) to open a business process model.
  2. Drag the required application service (Web service) from the Workspace Documents to the business process modeling environment to attach to the business process model.
  3. Select the Web service activity and click Message Map tab. The Message Map window for the Web service activity appears.
  4. Do one of the following to create an assignment:
    • Drag the source element from the Source column and drop it on the left box in the Assignments column. Likewise, drag the target element from the Target column and drop it on the left box in the Assignments column.
    • Right-click the element or message in the Target column, and select Create Assignment.
      Note: By default, this creates a Fixed Value assignment.
  5. Complete the Message Map assignments for other activities in the process model.
  6. Configure the other constructs used in the process model.
  7. Right-click in the business process modeling environment and select Business Process Execution > Validate and generate BPML. Alternatively, go to Workspace Documents <project>, right-click the <business process model> and select Business Process Execution > Validate and generate BPML. The Validate progress window appears and when the validation is over, if there are any warnings or errors, then the warnings window appears automatically. If there are warnings resolve them and re-validate the business process model.
  8. Right-click in the business process modeling environment and select Business Process Execution > Publish to Organization. Alternatively, go to Workspace Documents <project>, right-click the <business process model> and select Publish to Organization. The business process model is published to organization.
  9. Right-click in the business process modeling environment and select Business Process Execution > Run. The business process model is instantiated.

The Web service is used in the business process model.

Example of Designing a Business Process Model Using a Web service

The following example describes the procedure to create a business process model using a Web service to check the 'title' of an employee.

Business Requirements

The business process should satisfy the following requirements:

  1. Employee ID is provided as an input for the process.
  2. The first name, last name, and the title of the employee are displayed.
    Prerequisites
  3. Generate a Web service on Employee's table and create Notify Application Service XForm to display the employee first name and last name.
    Using a Web service in a Business Process Model
    You must next model the business process model and complete the Message Map for each activity in the business process model.
  4. Create a business process diagram using the requirements listed above. The business process model appears as follows:
  5. Click Message Map tab at the bottom of the business process model window. The Message Map appears displaying three columns - Source, Assignments and Target.
  6. Click Get Employees Object and create an assignment for the element as follows:
  7. Click Notify Application Service activity and create an assignment for the element as follows:
  8. Right-click in the business process modeling environment and select Business Process Execution > Validate and generate BPML. If there are any warnings they will be displayed in the Warning List pane.
  9. If there are no warnings, right-click in the business process modeling environment and select Business Process Execution > Publish to Organization.
  10. Right-click in the business process modeling environment and select Business Process Execution > Debug to verify that the business process model is executed properly.
    In this example, based on the employee ID, the first name, last name, and the title of the employee are displayed.